<script>
export default {
  onShow() {
    /** 隐藏自定义tabbar */
    wx.hideTabBar();
  },
  onReady: function() {
    wx.hideTabBar({
      fail: function() {
        setTimeout(function() {
          wx.hideTabBar();
        }, 500);
      }
    });
  },
  created() {
    // let that = this;
    wx.getSystemInfo({
      success: ({ model, statusBarHeight }) => {
        console.log(model);
        const phoneType =
          model.search("iPhone X") !== -1 ||
          model.search("<iPhone12") !== -1 ||
          model.search("iPhone 11") !== -1;
        wx.setStorageSync("phone", phoneType);
      }
    });
    // 调用API从本地缓存中获取数据
    /*
     * 平台 api 差异的处理方式:  api 方法统一挂载到 mpvue 名称空间, 平台判断通过 mpvuePlatform 特征字符串
     * 微信：mpvue === wx, mpvuePlatform === 'wx'
     * 头条：mpvue === tt, mpvuePlatform === 'tt'
     * 百度：mpvue === swan, mpvuePlatform === 'swan'
     * 支付宝(蚂蚁)：mpvue === my, mpvuePlatform === 'my'
     */
  },
  log() {
    console.log(`log at:${Date.now()}`);
  }
};
</script>

<style lang="less" >
page {
  font-family: PingFangSC-Regular, PingFangSC;
}
.manage {
  .van-search {
    padding: 0 !important;
  }
}
.collect,
.main,
.product {
  // .van-ellipsis {
  //   font-size: 13px;
  //   color: #909292;
  // }
  .van-tab--active {
    font-weight: bold;
    font-size: 16px;
    color: #187798;
  }
}
input {
  border: none;
  outline: none;
}
.container {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 200rpx 0;
  box-sizing: border-box;
}
.flex {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}

.flex-direction {
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}

.flex-1 {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.align-center {
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

.justify-content {
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
}
// .empty {
//   margin-top: 90px;
//   .emptyText {
//     margin-top: 40px;
//     font-size: 14px;
//     font-family: PingFangSC-Regular, PingFang SC;
//     font-weight: 400;
//     color: rgba(144, 146, 146, 1);
//     line-height: 20px;
//   }
// }
.activeMore {
  height: 74px;
  font-size: 13px;
  font-family: PingFangSC-Medium, PingFangSC;
  font-weight: 700;
  color: #b8bab9;
  line-height: 74px;
  text-align: center;
  // padding-top: 5px;
}
.flex-pack-justify {
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
}
.line_ellipsis {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.van-ellipsis {
  letter-spacing: 0 !important;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* this rule will be remove */
* {
  transition: width 2s;
  -moz-transition: width 2s;
  -webkit-transition: width 2s;
  -o-transition: width 2s;
}

.clearfix:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}
.clear {
  clear: both;
}
</style>
